#!/bin/bash
source $LFS/sources/pkg/utils.sh
PKG_NAME=$(pkgname $1 $2) && \
PKG_VERSION=$(pkgversion $1 $PKG_NAME) && \
PKG_ARCHIVE=$(pkgarchive $1 $PKG_NAME) && \
echo "$1/$2" && \
echo "  --> package source found: $PKG_NAME" && \
echo "  -->              version: $PKG_VERSION" && \
[ ! -e $LFS/sources/pkg/$1/$PKG_NAME/deps.pkg ] || {
    DEPS=$(cat $LFS/sources/pkg/$1/$PKG_NAME/deps.pkg | grep -v '^$' | grep -v '^#' | tr -s '[:blank:]' '-' | tr -s '[:space:]' ' ');
    echo "  -->         dependencies: $DEPS";
} && \
echo "  -->              archive: $PKG_ARCHIVE ($(ls $LFS/sources/$PKG_ARCHIVE.tar* 2> /dev/null || (echo '!missing archive file!')))"
exit $?
